using System;
using System.Security.Principal;

namespace Smarly.Core
{
	public class SmarlyIdentity : IIdentity
	{
		public SmarlyIdentity(bool isAuth, string name = null, bool isIdentify = false)
		{
			IsAuthenticated = isAuth;
			_name = name;
			IsIdentify = isIdentify;
		}

		public Guid? UserId { get; set; }
		public bool IsIdentify { get; private set; }
		public bool IsSubscriber { get; set; }
		public int PreviewCount { get; set; }

		#region Implementation of IIdentity

		private string _name;
		public string Name
		{
			get { return _name ?? string.Empty; }
		}


		public string AuthenticationType
		{
			get { return string.Empty; }
		}

		public bool IsAuthenticated { get; private set; }

		#endregion
	}
}